<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MTB CAT1 Peripheral driver library: PPU Programmable (PROG) v2 Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MTB CAT1 Peripheral driver library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group__prot__functions__ppu__prog__v2.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">PPU Programmable (PROG) v2 Functions<div class="ingroups"><a class="el" href="group__group__prot.html">Prot         (Protection Unit)</a> &raquo; <a class="el" href="group__group__prot__functions.html">Functions</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaa20aec5caa83d665c5a2afe241b6c69e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__prot__enums.html#ga13ede85383a4afaf5ed3a14b470e38bd">cy_en_prot_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__prot__functions__ppu__prog__v2.html#gaa20aec5caa83d665c5a2afe241b6c69e">Cy_Prot_ConfigPpuProgMasterAtt</a> (PERI_MS_PPU_PR_Type *base, uint16_t pcMask, <a class="el" href="group__group__prot__enums.html#ga330789bc5242c26b8a32df63fa8720e5">cy_en_prot_perm_t</a> userPermission, <a class="el" href="group__group__prot__enums.html#ga330789bc5242c26b8a32df63fa8720e5">cy_en_prot_perm_t</a> privPermission, bool secure)</td></tr>
<tr class="memdesc:gaa20aec5caa83d665c5a2afe241b6c69e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configures the protection-structure attributes of the Programmable Peripheral Protection Unit (PPU PROG) master.  <a href="#gaa20aec5caa83d665c5a2afe241b6c69e">More...</a><br /></td></tr>
<tr class="separator:gaa20aec5caa83d665c5a2afe241b6c69e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7941e969542970aedcb056f554b5383b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__prot__enums.html#ga13ede85383a4afaf5ed3a14b470e38bd">cy_en_prot_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__prot__functions__ppu__prog__v2.html#ga7941e969542970aedcb056f554b5383b">Cy_Prot_ConfigPpuProgSlaveAtt</a> (PERI_MS_PPU_PR_Type *base, uint16_t pcMask, <a class="el" href="group__group__prot__enums.html#ga330789bc5242c26b8a32df63fa8720e5">cy_en_prot_perm_t</a> userPermission, <a class="el" href="group__group__prot__enums.html#ga330789bc5242c26b8a32df63fa8720e5">cy_en_prot_perm_t</a> privPermission, bool secure)</td></tr>
<tr class="memdesc:ga7941e969542970aedcb056f554b5383b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configures the protection structure with its protection attributes of the Programmable Peripheral Protection Unit (PPU PROG) slave.  <a href="#ga7941e969542970aedcb056f554b5383b">More...</a><br /></td></tr>
<tr class="separator:ga7941e969542970aedcb056f554b5383b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga37f73e968bc327a33ae55eab02c315ac"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__prot__enums.html#ga13ede85383a4afaf5ed3a14b470e38bd">cy_en_prot_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__prot__functions__ppu__prog__v2.html#ga37f73e968bc327a33ae55eab02c315ac">Cy_Prot_ConfigPpuProgSlaveAddr</a> (PERI_MS_PPU_PR_Type *base, uint32_t address, <a class="el" href="group__group__prot__enums.html#gaad39ed0d259460f717edfe9d08fc005f">cy_en_prot_size_t</a> regionSize)</td></tr>
<tr class="memdesc:ga37f73e968bc327a33ae55eab02c315ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configures the protection-structure address settings of the Programmable Peripheral Protection Unit (PPU PROG) slave.  <a href="#ga37f73e968bc327a33ae55eab02c315ac">More...</a><br /></td></tr>
<tr class="separator:ga37f73e968bc327a33ae55eab02c315ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga93cd67a67fecfb39b3df272b9f64a780"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__prot__enums.html#ga13ede85383a4afaf5ed3a14b470e38bd">cy_en_prot_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__prot__functions__ppu__prog__v2.html#ga93cd67a67fecfb39b3df272b9f64a780">Cy_Prot_EnablePpuProgSlaveRegion</a> (PERI_MS_PPU_PR_Type *base)</td></tr>
<tr class="memdesc:ga93cd67a67fecfb39b3df272b9f64a780"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables the Slave PPU PROG structure.  <a href="#ga93cd67a67fecfb39b3df272b9f64a780">More...</a><br /></td></tr>
<tr class="separator:ga93cd67a67fecfb39b3df272b9f64a780"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacd5db7ab07edb2943e6f0c2486c6c6d0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__prot__enums.html#ga13ede85383a4afaf5ed3a14b470e38bd">cy_en_prot_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__prot__functions__ppu__prog__v2.html#gacd5db7ab07edb2943e6f0c2486c6c6d0">Cy_Prot_DisablePpuProgSlaveRegion</a> (PERI_MS_PPU_PR_Type *base)</td></tr>
<tr class="memdesc:gacd5db7ab07edb2943e6f0c2486c6c6d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disables the Slave PPU PROG structure.  <a href="#gacd5db7ab07edb2943e6f0c2486c6c6d0">More...</a><br /></td></tr>
<tr class="separator:gacd5db7ab07edb2943e6f0c2486c6c6d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="gaa20aec5caa83d665c5a2afe241b6c69e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa20aec5caa83d665c5a2afe241b6c69e">&#9670;&nbsp;</a></span>Cy_Prot_ConfigPpuProgMasterAtt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__prot__enums.html#ga13ede85383a4afaf5ed3a14b470e38bd">cy_en_prot_status_t</a> Cy_Prot_ConfigPpuProgMasterAtt </td>
          <td>(</td>
          <td class="paramtype">PERI_MS_PPU_PR_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>pcMask</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__prot__enums.html#ga330789bc5242c26b8a32df63fa8720e5">cy_en_prot_perm_t</a>&#160;</td>
          <td class="paramname"><em>userPermission</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__prot__enums.html#ga330789bc5242c26b8a32df63fa8720e5">cy_en_prot_perm_t</a>&#160;</td>
          <td class="paramname"><em>privPermission</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>secure</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Configures the protection-structure attributes of the Programmable Peripheral Protection Unit (PPU PROG) master. </p>
<p>This function configures the master structure governing the corresponding slave structure pair. It is a mechanism to protect the slave PPU PROG structure. The memory location of the slave structure is known, so the address, regionSize, and sub-regions of the configuration structure are not applicable.</p>
<dl class="section note"><dt>Note</dt><dd>This function is applicable for CPUSS ver_2 only.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The register base address of the protection structure is being configured.</td></tr>
    <tr><td class="paramname">pcMask</td><td>The protection context mask. It specifies the protection context or a set of multiple protection contexts to be configured. It is a value of OR'd (|) items of <a class="el" href="group__group__prot__enums.html#ga4486bc74d6e98ad99c1ce4d532e48d0f">cy_en_prot_pcmask_t</a>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The function accepts pcMask values from <a class="el" href="group__group__prot__enums.html#gga4486bc74d6e98ad99c1ce4d532e48d0fabf25e25bbce833636da932ce78e453e8">CY_PROT_PCMASK1</a> to <a class="el" href="group__group__prot__enums.html#gga4486bc74d6e98ad99c1ce4d532e48d0fa839e450c014d2151df162ed6f5dc6aa0">CY_PROT_PCMASK15</a>. But each device has its own number of available protection contexts. That number is defined by PERI_PC_NR in the config file. If pcMask is passed beyond the range of available protection context, the bits above PERI_PC_NR will be ignored.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">userPermission</td><td>The user permission setting. The CY_PROT_PERM_R or CY_PROT_PERM_RW values are valid for the master.</td></tr>
    <tr><td class="paramname">privPermission</td><td>The privileged permission setting. CY_PROT_PERM_R or CY_PROT_PERM_RW values are valid for the master.</td></tr>
    <tr><td class="paramname">secure</td><td>The secure flag.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status of the function call.</dd></dl>
<table class="doxtable">
<tr>
<th>Status </th><th>Description  </th></tr>
<tr>
<td>CY_PROT_SUCCESS </td><td>The attributes were set up. </td></tr>
<tr>
<td>CY_PROT_FAILURE </td><td>The attributes were not set up because the structure is possibly locked. </td></tr>
<tr>
<td>CY_PROT_INVALID_STATE </td><td>The function was called on the device with an unsupported PERI HW version. </td></tr>
</table>
<dl class="section note"><dt>Note</dt><dd>Only the user's/privileged Write permissions are configurable. The Read permissions are read-only and cannot be configured.</dd>
<dd>
PC0 accesses are read-only and are always enabled.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: A bus master is forbidden to have access to the PERI_MS_PPU_PR4 master </span></div><div class="line"><span class="comment">                 and slave attributes when it is operating with PC=0, &quot;secure&quot;, </span></div><div class="line"><span class="comment">                 and &quot;privileged&quot; access settings. The PERI_MS_PPU_PR4 slave attributes</span></div><div class="line"><span class="comment">                 and address are already configured and enabled. */</span></div><div class="line"></div><div class="line">    <span class="keywordflow">if</span>(<a class="code" href="group__group__prot__enums.html#gga13ede85383a4afaf5ed3a14b470e38bda462f07fcb31ed8a07dd273af4290691d">CY_PROT_SUCCESS</a> !=  <a class="code" href="group__group__prot__functions__ppu__prog__v2.html#gaa20aec5caa83d665c5a2afe241b6c69e">Cy_Prot_ConfigPpuProgMasterAtt</a>(PERI_MS_PPU_PR4, <span class="comment">/* Programmable protection structure pair 4 base */</span></div><div class="line">                                                          (uint16_t)0UL, <span class="comment">/* Only allow PC=0 bus masters */</span></div><div class="line">                                                           <a class="code" href="group__group__prot__enums.html#gga330789bc5242c26b8a32df63fa8720e5aad6e3850fb76be4bd78240a4fc284985">CY_PROT_PERM_R</a>,  <span class="comment">/* Read access always available for Master */</span></div><div class="line">                                                           <a class="code" href="group__group__prot__enums.html#gga330789bc5242c26b8a32df63fa8720e5aa7d757bf3cedd4f675b65d3ed642d315">CY_PROT_PERM_RW</a>,  <span class="comment">/* Allow read and write privileged mode accesses */</span></div><div class="line">                                                           <span class="keyword">true</span>))  <span class="comment">/* Only allow &quot;secure&quot; bus masters */</span></div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line"></div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga7941e969542970aedcb056f554b5383b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7941e969542970aedcb056f554b5383b">&#9670;&nbsp;</a></span>Cy_Prot_ConfigPpuProgSlaveAtt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__prot__enums.html#ga13ede85383a4afaf5ed3a14b470e38bd">cy_en_prot_status_t</a> Cy_Prot_ConfigPpuProgSlaveAtt </td>
          <td>(</td>
          <td class="paramtype">PERI_MS_PPU_PR_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>pcMask</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__prot__enums.html#ga330789bc5242c26b8a32df63fa8720e5">cy_en_prot_perm_t</a>&#160;</td>
          <td class="paramname"><em>userPermission</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__prot__enums.html#ga330789bc5242c26b8a32df63fa8720e5">cy_en_prot_perm_t</a>&#160;</td>
          <td class="paramname"><em>privPermission</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>secure</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Configures the protection structure with its protection attributes of the Programmable Peripheral Protection Unit (PPU PROG) slave. </p>
<p>This function configures the slave structure of the PPU PROG pair, which can protect any peripheral memory region in a device from invalid bus-master access.</p>
<dl class="section note"><dt>Note</dt><dd>This function is applicable for CPUSS ver_2 only.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The register base address of the protection structure is being configured.</td></tr>
    <tr><td class="paramname">pcMask</td><td>The protection context mask. It specifies the protection context or a set of multiple protection contexts to be configured. It is a value of OR'd (|) items of <a class="el" href="group__group__prot__enums.html#ga4486bc74d6e98ad99c1ce4d532e48d0f">cy_en_prot_pcmask_t</a>. For example: (<a class="el" href="group__group__prot__enums.html#gga4486bc74d6e98ad99c1ce4d532e48d0fabf25e25bbce833636da932ce78e453e8">CY_PROT_PCMASK1</a> | <a class="el" href="group__group__prot__enums.html#gga4486bc74d6e98ad99c1ce4d532e48d0fa33b7e98df492418f5f7fa8882c27e2bd">CY_PROT_PCMASK3</a> | <a class="el" href="group__group__prot__enums.html#gga4486bc74d6e98ad99c1ce4d532e48d0fa2e5214be494696cd798202bc14b14029">CY_PROT_PCMASK4</a>). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The function accepts pcMask values from <a class="el" href="group__group__prot__enums.html#gga4486bc74d6e98ad99c1ce4d532e48d0fabf25e25bbce833636da932ce78e453e8">CY_PROT_PCMASK1</a> to <a class="el" href="group__group__prot__enums.html#gga4486bc74d6e98ad99c1ce4d532e48d0fa839e450c014d2151df162ed6f5dc6aa0">CY_PROT_PCMASK15</a>. But each device has its own number of available protection contexts. That number is defined by PERI_PC_NR in the config file.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">userPermission</td><td>The user permission setting.</td></tr>
    <tr><td class="paramname">privPermission</td><td>The privileged permission setting.</td></tr>
    <tr><td class="paramname">secure</td><td>The secure flag.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status of the function call.</dd></dl>
<table class="doxtable">
<tr>
<th>Status </th><th>Description  </th></tr>
<tr>
<td>CY_PROT_SUCCESS </td><td>The attributes were set up. </td></tr>
<tr>
<td>CY_PROT_FAILURE </td><td>The attributes were not set up because the structure is possibly locked. </td></tr>
<tr>
<td>CY_PROT_INVALID_STATE </td><td>The function was called on the device with an unsupported PERI HW version. </td></tr>
</table>
<dl class="section note"><dt>Note</dt><dd>PC0 accesses are read-only and are always enabled.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: A bus master is forbidden to have access to the GPIO port 0 registers </span></div><div class="line"><span class="comment">                 (0x40310000 ~ 0x4031007F) when it has the &quot;secure&quot; attribute </span></div><div class="line"><span class="comment">                 and is operating at PC=3. */</span></div><div class="line"></div><div class="line">    <span class="comment">/* Configure the attributes settings */</span></div><div class="line">    <span class="keywordflow">if</span>(<a class="code" href="group__group__prot__enums.html#gga13ede85383a4afaf5ed3a14b470e38bda462f07fcb31ed8a07dd273af4290691d">CY_PROT_SUCCESS</a> != <a class="code" href="group__group__prot__functions__ppu__prog__v2.html#ga7941e969542970aedcb056f554b5383b">Cy_Prot_ConfigPpuProgSlaveAtt</a>(PERI_MS_PPU_PR4, <span class="comment">/* Programmable protection structure pair 4 base */</span></div><div class="line">                                            (uint16_t)<a class="code" href="group__group__prot__enums.html#gga4486bc74d6e98ad99c1ce4d532e48d0fa33b7e98df492418f5f7fa8882c27e2bd">CY_PROT_PCMASK3</a>,   <span class="comment">/* Allow PC=0 and PC=3 accesses */</span></div><div class="line">                                            <a class="code" href="group__group__prot__enums.html#gga330789bc5242c26b8a32df63fa8720e5aa7d757bf3cedd4f675b65d3ed642d315">CY_PROT_PERM_RW</a>,  <span class="comment">/* Allow Read and Write user mode accesses */</span></div><div class="line">                                            <a class="code" href="group__group__prot__enums.html#gga330789bc5242c26b8a32df63fa8720e5aa7d757bf3cedd4f675b65d3ed642d315">CY_PROT_PERM_RW</a>,  <span class="comment">/* Allow Read and Write privileged mode accesses */</span></div><div class="line">                                            <span class="keyword">true</span>))  <span class="comment">/* Only allow &quot;secure&quot; bus masters */</span></div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="comment">/* Configure the address settings */</span></div><div class="line">    <span class="keywordflow">if</span>(<a class="code" href="group__group__prot__enums.html#gga13ede85383a4afaf5ed3a14b470e38bda462f07fcb31ed8a07dd273af4290691d">CY_PROT_SUCCESS</a> !=  <a class="code" href="group__group__prot__functions__ppu__prog__v2.html#ga37f73e968bc327a33ae55eab02c315ac">Cy_Prot_ConfigPpuProgSlaveAddr</a>(PERI_MS_PPU_PR4, <span class="comment">/* Programmable protection structure pair 4 base */</span></div><div class="line">                                                           (uint32_t)GPIO_PRT0, <span class="comment">/* Starting address at GPIO port 0 base */</span></div><div class="line">                                                           <a class="code" href="group__group__prot__enums.html#ggaad39ed0d259460f717edfe9d08fc005fac95822db72eb8b6b16cd97f84c0d0b12">CY_PROT_SIZE_256B</a>))    <span class="comment">/* Protect block of 256 Bytes */</span></div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="comment">/* Enables the Slave PPU PROG structure */</span></div><div class="line">    <a class="code" href="group__group__prot__functions__ppu__prog__v2.html#ga93cd67a67fecfb39b3df272b9f64a780">Cy_Prot_EnablePpuProgSlaveRegion</a>(PERI_MS_PPU_PR4);</div><div class="line"></div></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="ga37f73e968bc327a33ae55eab02c315ac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga37f73e968bc327a33ae55eab02c315ac">&#9670;&nbsp;</a></span>Cy_Prot_ConfigPpuProgSlaveAddr()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__prot__enums.html#ga13ede85383a4afaf5ed3a14b470e38bd">cy_en_prot_status_t</a> Cy_Prot_ConfigPpuProgSlaveAddr </td>
          <td>(</td>
          <td class="paramtype">PERI_MS_PPU_PR_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>address</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__prot__enums.html#gaad39ed0d259460f717edfe9d08fc005f">cy_en_prot_size_t</a>&#160;</td>
          <td class="paramname"><em>regionSize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Configures the protection-structure address settings of the Programmable Peripheral Protection Unit (PPU PROG) slave. </p>
<p>This function configures the slave structure of the PPU PROG pair, which can protect any peripheral memory region in a device from an invalid bus-master access.</p>
<dl class="section note"><dt>Note</dt><dd>This function is applicable for CPUSS ver_2 only.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The register base address of the protection structure is being configured.</td></tr>
    <tr><td class="paramname">address</td><td>The address.</td></tr>
    <tr><td class="paramname">regionSize</td><td>The region size.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status of the function call.</dd></dl>
<table class="doxtable">
<tr>
<th>Status </th><th>Description  </th></tr>
<tr>
<td>CY_PROT_SUCCESS </td><td>The address settings were set up. </td></tr>
<tr>
<td>CY_PROT_FAILURE </td><td>The address settings were not set up because the structure is possibly locked. </td></tr>
<tr>
<td>CY_PROT_INVALID_STATE </td><td>The function was called on the device with an unsupported PERI HW version. </td></tr>
</table>
<dl class="section note"><dt>Note</dt><dd>PC0 accesses are Read-only and are always enabled.</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd><a class="el" href="group__group__prot__functions__ppu__prog__v2.html#ga7941e969542970aedcb056f554b5383b">Cy_Prot_ConfigPpuProgSlaveAtt</a> </dd></dl>

</div>
</div>
<a id="ga93cd67a67fecfb39b3df272b9f64a780"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga93cd67a67fecfb39b3df272b9f64a780">&#9670;&nbsp;</a></span>Cy_Prot_EnablePpuProgSlaveRegion()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__prot__enums.html#ga13ede85383a4afaf5ed3a14b470e38bd">cy_en_prot_status_t</a> Cy_Prot_EnablePpuProgSlaveRegion </td>
          <td>(</td>
          <td class="paramtype">PERI_MS_PPU_PR_Type *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enables the Slave PPU PROG structure. </p>
<p>This is the PPU PROG slave-structure enable function. The PPU PROG protection settings will take effect after a successful completion of this function call.</p>
<dl class="section note"><dt>Note</dt><dd>This function is applicable for CPUSS ver_2 only.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The base address for the protection unit structure is being configured.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status of the function call.</dd></dl>
<table class="doxtable">
<tr>
<th>Status </th><th>Description  </th></tr>
<tr>
<td>CY_PROT_SUCCESS </td><td>The structure was enabled. </td></tr>
<tr>
<td>CY_PROT_FAILURE </td><td>The structure is disabled and possibly locked. </td></tr>
<tr>
<td>CY_PROT_INVALID_STATE </td><td>The function was called on the device with an unsupported PERI HW version. </td></tr>
</table>
<dl class="section user"><dt>Function Usage</dt><dd><a class="el" href="group__group__prot__functions__ppu__prog__v2.html#ga7941e969542970aedcb056f554b5383b">Cy_Prot_ConfigPpuProgSlaveAtt</a> </dd></dl>

</div>
</div>
<a id="gacd5db7ab07edb2943e6f0c2486c6c6d0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacd5db7ab07edb2943e6f0c2486c6c6d0">&#9670;&nbsp;</a></span>Cy_Prot_DisablePpuProgSlaveRegion()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__prot__enums.html#ga13ede85383a4afaf5ed3a14b470e38bd">cy_en_prot_status_t</a> Cy_Prot_DisablePpuProgSlaveRegion </td>
          <td>(</td>
          <td class="paramtype">PERI_MS_PPU_PR_Type *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Disables the Slave PPU PROG structure. </p>
<p>This is the PPU PROG slave-structure disable function. The PPU PROG protection settings will seize to take effect after successful completion of this function call.</p>
<dl class="section note"><dt>Note</dt><dd>This function is applicable for CPUSS ver_2 only.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The base address for the protection unit structure is being configured.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The status of the function call.</dd></dl>
<table class="doxtable">
<tr>
<th>Status </th><th>Description  </th></tr>
<tr>
<td>CY_PROT_SUCCESS </td><td>The slave PPU PROG structure was disabled. </td></tr>
<tr>
<td>CY_PROT_FAILURE </td><td>The structure is enabled and possibly locked. </td></tr>
<tr>
<td>CY_PROT_INVALID_STATE </td><td>The function was called on the device with an unsupported PERI HW version. </td></tr>
</table>
<dl class="section user"><dt>Function Usage</dt><dd><div class="fragment"><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: The slave struct of PERI_MS_PPU_PR4 needs to be disabled. Or it</span></div><div class="line"><span class="comment">                 needs to be reconfigured and hence must first be disabled. */</span></div><div class="line">     </div><div class="line">    <span class="keywordflow">if</span>(<a class="code" href="group__group__prot__enums.html#gga13ede85383a4afaf5ed3a14b470e38bda462f07fcb31ed8a07dd273af4290691d">CY_PROT_SUCCESS</a> != <a class="code" href="group__group__prot__functions__ppu__prog__v2.html#gacd5db7ab07edb2943e6f0c2486c6c6d0">Cy_Prot_DisablePpuProgSlaveRegion</a>(PERI_MS_PPU_PR4))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line"></div></div><!-- fragment --></dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>MTB CAT1 Peripheral driver library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
